package com.taylover.test.character;

import com.taylover.test.exception.IndexIsNagetiveException;
import com.taylover.test.exception.IndexIsOutofRangeException;

/**
 * @author xyzZero3
 * @date 2025/4/19 19:56
 */
public interface IStringBuffer {
    void append(String str); //追加字符串

    void append(char c);  //追加字符

    void insert(int pos,char b) throws IndexIsNagetiveException, IndexIsOutofRangeException; //指定位置插入字符

    void insert(int pos,String b) throws IndexIsNagetiveException, IndexIsOutofRangeException, NullPointerException; //指定位置插入字符串

    void delete(int start) throws IndexIsNagetiveException, IndexIsOutofRangeException; //从开始位置删除剩下的

    void delete(int start,int end) throws IndexIsNagetiveException, IndexIsOutofRangeException; //从开始位置删除结束位置-1

    void reverse(); //反转

    int length(); //返回长度
}
